home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_09_02 / 9n02107a < prev    next >
Text File  |  1990-12-15  |  467b  |  33 lines

  1.  
  2.  
  3.  
  4. /*Program to turn small letters into Caps.*/
  5. /*R. McLaughlin*/
  6.  
  7. /*Includes*/
  8. #include <stdio.h>
  9. #include <string.h>
  10. #include <ctype.h>
  11. /*Data Structures*/
  12. #define FALSE 0
  13. #define FOREVER 1
  14. #define LOWER "a"
  15. #define UPPER "z"
  16. #define MASK  0x20
  17. int input;
  18.  
  19. /*Code*/
  20. main()
  21. {
  22. while(FOREVER)
  23.      {
  24.      input=getchar();
  25.      if (input>LOWER)&&(input<UPPER)
  26.         {
  27.          input=input^MASK;
  28.         }
  29.      printf(input);
  30.      }
  31. }
  32.  
  33.